<?php

class Application_Form_Email extends Validation_Form
{

	public function init()
	{
		$this->setName("email");
		$this->setMethod('post');

		$email = $this->createElement('text', 'email');
		$email->setLabel('E-mail:')
			  ->setRequired(TRUE)
		      ->setAttrib('size', 30)
		      ->addFilters(array(
		         new Zend_Filter_StringTrim(),
		         new Zend_Filter_StripNewlines(),
		         new Zend_Filter_StripTags()
		      ))
		      ->addValidators(array(
			     new Zend_Validate_EmailAddress(),
			     new Zend_Validate_NotEmpty()
			  ));
		$this->addElements(array(
		     $email, 
		     array('submit', 'submit', array('label' => 'Wyslij E-mail'))
        ));
	}


}

